import axios from 'axios'

// let base = 'http://consumer.bestproperty.com.mm'
// let base = 'http://testadmin.dlintech.com'
// let base = 'api'
// let base = 'http://bestproperty.com.mm'
// let base = 'http://developer.dlintech.com'
let base = '';

//查询详情信息
// buy/rent details
export const visitorInformation = (params) => { return axios.get(`${base}/app/transaction/visitor/` + params) }
//development details
export const developmentInformation = (params) => { return axios.get(`${base}/app/development/visitor/` + params + '/contact') }
// hostel details
export const hostelInformation = (params) => { return axios.get(`${base}/app/landlord/property/visitor/` + params) }
// 搜索hostel接口
export const searchHostelList = params => { return axios.get(`${base}/app/landlord/property/visitor`, {params}) }
//buy/rent 显示手机号后台统计
export const contactCount = (id, params) => { return axios.put(`${base}/app/transaction/contact/count/add/` + id, params) }
//developer 显示手机号后台统计
export const contactCountDev = (id, params) => { return axios.put(`${base}/app/development/contact/count/add/` + id, params) }
//hostel 显示手机号后台统计
export const contactCountHostel = (id, params) => { return axios.put(`${base}/app/development/contact/count/add/` + id, params) }



// 手机验证码登录
export const loginUser = params => { return axios.post(`${base}/app/user/login-sms`, params) }
// Google 登录
export const loginWithGoogle = params => { return axios.post(`${base}/app/user/login/google`, params) }
// FaceBook 登录
export const loginWithFaceBook = params => { return axios.post(`${base}/app/user/login/facebook`, params) }
// 发送sms校验码
export const sendSmsUser = params => { return axios.post(`${base}/send-checkmobi-sms`, params) }
// 注册
export const registerUser = params => { return axios.post(`${base}/app/user/register`, params) }
// 退出登录
export const signOutUser = params => { return axios.post(`${base}/app/user/sign-out`, params) }
// 账号密码登录
export const loginWithPassAndName = params => { return axios.post(`${base}/app/user/login-password`, params) }
//邮箱注册
export const registerUserWithEmail = params => { return axios.post(`${base}/app/user/send-email-register`, params) }
//google注册
export const registerWithGoogle = params => { return axios.post(`${base}/app/user/register/google`, params) }
//Facebook 注册
export const registerWithFaceBook = params => { return axios.post(`${base}/app/user/register/facebook`, params) }
// 忘记密码 -- 通过手机重置密码
export const resetPassword = params => { return axios.post(`${base}/app/user/user/forget-password-sms`, params) }
// 忘记密码 -- 通过手邮箱重置密码
export const forgotEmailPassword = params => { return axios.post(`${base}/app/user/send-forget-password-email`, params) }
// 邮箱点击收到的链接后 -- 重置密码
export const resetEmailPassword = params => { return axios.post(`${base}/app/user/update-password`, params) }
